Use instrument-generic futures routes in Python 1.12.6 - #90
Conversation
|
Warning Review limit reached
Next review available in: 53 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe SDK now routes Brent, WTI, gasoil, and EU carbon futures through instrument-generic API slugs. Legacy venue slugs and contract codes remain accepted. Synchronous and asynchronous resources, tests, documentation, and release metadata now reflect version 1.12.6. ChangesFutures Routing
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant normalize_futures_slug
participant FuturesResource
participant FuturesAPI
Client->>normalize_futures_slug: Send generic slug, legacy slug, or contract code
normalize_futures_slug->>FuturesResource: Resolve canonical instrument slug
FuturesResource->>FuturesAPI: Request generic futures endpoint
FuturesAPI-->>Client: Return futures data
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_release_readiness.py`:
- Around line 90-102: Update
test_packaged_futures_examples_prefer_instrument_generic_slugs to validate
oilpriceapi/resources/futures.py and oilpriceapi/async_resources.py separately,
preventing one module from satisfying another’s requirements. Require the
generic examples for brent, wti, gasoil, and eu-carbon in both synchronous and
asynchronous forms, while preserving the existing prohibition on ice- and
eua-prefixed slugs.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: a810599f-8f0d-4bdb-87a2-ac66ba85533c
📒 Files selected for processing (11)
CHANGELOG.mdoilpriceapi/async_resources.pyoilpriceapi/resources/_futures_slug.pyoilpriceapi/resources/futures.pyoilpriceapi/version.pypyproject.tomltests/integration/test_live_futures.pytests/test_release_readiness.pytests/unit/test_async_futures_resource.pytests/unit/test_futures_resource.pytests/unit/test_futures_slug.py
Summary
brent,wti,gasoil, andeu-carbonin public examplesRed-green proof
EU_CARBONandUK_CARBON--ignore-missing-imports; pip-audit found no vulnerabilities521fbaed19e5d715c2369b55ac277509ef084e59: 53 files, recursive installed-artifact claim scan green, clean import/route-map smoke greenRefs OilpriceAPI/oilpriceapi-api#4175
Summary by CodeRabbit
New Features
Documentation
Release